{% extends 'cms/base.html' %}
{% block title -%}
    管理员信息
{%- endblock %}
{% block page_title -%}
    个人信息
{%- endblock %}
{% block main_content %}
    <table class="table table-bordered">
    {% set user = g.cms_user %}
        <tbody>
            <tr>
                <td>用户名</td>
                <td>{{ user.username }}</td>
            </tr>
            <tr>
                <td>邮箱</td>
                <td>{{ user.email }}</td>
            </tr>
            <tr>
                <td>角色</td>
                <td>
                {% for role in user.roles %}
                    {{ role.name }}
                    {% if not loop.last %}
                        {{ ' | ' }}
                    {% endif %}
                {% endfor %}
                </td>
            </tr>
            <tr>
                <td>权限</td>
                <td>
                    {% for role in user.roles %}
                        {{ role.desc }}
                        {% if not loop.last %}
                            {{ ' | ' }}
                        {% endif %}
                    {% endfor %}
                </td>
            </tr>
            <tr>
                <td>加入时间</td>
                <td>{{ g.cms_user.create_time }}</td>
            </tr>
        </tbody>
    </table>
{% endblock %}